<include file="public@header" />
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('admin/agreement/index')}">列表</a></li>
        <li class="active"><a>编辑</a></li>
    </ul>

    <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('admin/agreement/edit')}">

        <div class="form-group">
            <label for="title" class="col-sm-2 control-label"><span class="form-required">*</span>协议名称</label>
            <div class="col-md-6 col-sm-10">
                <input type="text" name="title" id="title" class="form-control" value="{$data['title']}" />
            </div>
        </div>
        <div class="form-group">
            <label for="type" class="col-sm-2 control-label"><span class="form-required">*</span>协议类型</label>
            <div class="col-md-6 col-sm-10">
                <select class="form-control" name="type" id="type">
                    <option value="">--请选择协议类型--</option>
                    <foreach name="agreementTypeData" item="type">
                        <option value="{$type.type}" <if condition="$type.type eq $data['type']" > selected </if> >{$type.name}</option>
                    </foreach>
                </select>
            </div>
        </div>

        <div class="form-group">
            <label for="content" class="col-sm-2 control-label"><span class="form-required">*</span>协议内容</label>
            <div class="col-md-6 col-sm-10">
                <script type="text/plain" id="content" name="content">{$data['content']|default=""|htmlspecialchars_decode}</script>
                <literal><span style="color: #ffb752;"></span></literal>
            </div>
        </div>

        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('EDIT')}</button>
                <a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
            </div>
        </div>
        <input type="hidden" name="id" value="{$data['id']}">
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script src="__STATIC__/layui/layui.js"></script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
    var editorcontent = new baidu.editor.ui.Editor();
    editorcontent.render('content');
</script>
</body>
</html>